package www.ld.com.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import www.ld.com.converter.LongTOLongConverter;
import www.ld.com.converter.StringEmptyTONullConverter;
import www.ld.com.converter.StringTOLocalDateTime;
import www.ld.com.converter.StringTOLongConverter;

@Configuration
public class MyWebMvcConfigure implements WebMvcConfigurer {
    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverter(new StringEmptyTONullConverter());
        registry.addConverter(new StringTOLongConverter());
        registry.addConverter(new LongTOLongConverter());
        registry.addConverter(new StringTOLocalDateTime());
    }
}
